package com.ruoyi.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.domain.WxTeam;
import com.ruoyi.service.IWxTeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.WxTeamMapper;
import com.ruoyi.domain.WxTeam;
import com.ruoyi.service.IWxTeamService;

/**
 * 战队Service业务层处理
 * 
 * @author zy
 * @date 2022-03-27
 */
@Service
public class WxTeamServiceImpl implements IWxTeamService
{
    @Autowired
    private WxTeamMapper wxTeamMapper;

    /**
     * 查询战队
     * 
     * @param id 战队主键
     * @return 战队
     */
    @Override
    public WxTeam selectWxTeamById(Long id)
    {
        return wxTeamMapper.selectWxTeamById(id);
    }

    /**
     * 查询战队列表
     * 
     * @param wxTeam 战队
     * @return 战队
     */
    @Override
    public List<WxTeam> selectWxTeamList(WxTeam wxTeam)
    {
        return wxTeamMapper.selectWxTeamList(wxTeam);
    }

    /**
     * 新增战队
     * 
     * @param wxTeam 战队
     * @return 结果
     */
    @Override
    public int insertWxTeam(WxTeam wxTeam)
    {
        wxTeam.setCreateTime(DateUtils.getNowDate());
        return wxTeamMapper.insertWxTeam(wxTeam);
    }

    /**
     * 修改战队
     * 
     * @param wxTeam 战队
     * @return 结果
     */
    @Override
    public int updateWxTeam(WxTeam wxTeam)
    {
        wxTeam.setUpdateTime(DateUtils.getNowDate());
        return wxTeamMapper.updateWxTeam(wxTeam);
    }

    /**
     * 批量删除战队
     * 
     * @param ids 需要删除的战队主键
     * @return 结果
     */
    @Override
    public int deleteWxTeamByIds(Long[] ids)
    {
        return wxTeamMapper.deleteWxTeamByIds(ids);
    }

    /**
     * 删除战队信息
     * 
     * @param id 战队主键
     * @return 结果
     */
    @Override
    public int deleteWxTeamById(Long id)
    {
        return wxTeamMapper.deleteWxTeamById(id);
    }
}
